from sqlalchemy import func, select, exc, and_
from app.config.db import DBUtils
from app.model.actualcontrollerModel import ActualController

db_utils = DBUtils()

class SjkzrService:

    def __init__(self):
        self.db = DBUtils()

    def select_sjkzr_by_company(self, session, company_name):
        sjkzr_data = session.query(ActualController).filter(ActualController.GSMC == company_name).all()
        sjkzr_list = [item.to_dict() for item in sjkzr_data]
        return sjkzr_list
